package aad.storyboard.model;

import aad.storyboard.controller.GUIComposer;
import aad.storyboard.view.GraphicView;
import android.graphics.Bitmap;
import android.graphics.BlurMaskFilter;
import android.graphics.Canvas;
import android.graphics.Color;
import android.graphics.Paint;

public class BlurEffect {	
	Image image;
	Paint paint;
	Bitmap alpha;
	 
	public BlurEffect(Image img){	
	
	this.image=img;
	createBlurredImage(img);
    
	}
	
	public void createBlurredImage(Image image)
	{
		//Clickability
	    Bitmap alpha = image.getBitmap().extractAlpha();
	    BlurMaskFilter blurMaskFilter = new BlurMaskFilter(10,
	    BlurMaskFilter.Blur.OUTER);

	    Paint paint = new Paint();
	    paint.setMaskFilter(blurMaskFilter);
	    paint.setColor(Color.YELLOW);

	    this.paint=paint;
	    this.alpha=alpha;
	}
	
	public Bitmap getAlphaBitmap()
	{
		return alpha;
	}

	public Paint getBlurPaint()
	{
		return paint;
	}
}
